<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData: {
			 apiUrl: "http://localhost:8081",
			// apiUrl: "http://192.168.17.212:8081",
			// apiUrl: "http://10.18.240.152:8081",
			user: {
				userId: 0,
				username: "admin",
				longitude: 0.0,
				latitude: 0.0
			},
			renting: false,
			host: "localhost",
			setToken: function(){
	
				var tokenName = uni.getStorageSync('tokenName'); // 从本地缓存读取tokenName值
				var tokenValue = uni.getStorageSync('tokenValue'); // 从本地缓存读取tokenValue值
				var header = {
					"content-type": 'application/json'
				};
				if (tokenName != undefined && tokenName != '') {
					header[tokenName] = tokenValue;
				}
				return header;
				
			}
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
